# Contributor: Edd Salkield <edd@salkield.uk>
# Maintainer: Edd Salkield <edd@salkield.uk>
pkgname=khinsider
pkgver=2.0.7
pkgrel=10
pkgdesc="A khinsider downloader written in Go"
url="https://github.com/marcus-crane/khinsider"
arch="all"
license="MIT"
makedepends="go"
source="https://github.com/marcus-crane/khinsider/archive/v$pkgver/khinsider-v$pkgver.tar.gz"
options="!check net"	# No upstream tests

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
export GOFLAGS="$GOFLAGS -modcacherw"

prepare() {
	default_prepare
	go mod download
}

build() {
	go build
}

package() {
	install -Dm755 "$builddir"/khinsider "$pkgdir"/usr/bin/khinsider
}

sha512sums="
f91b2c3f27fd1704b1fbeef31f202a50438ef37915b912cb6b391ea0553aa15e361f258cf99691cd434b3b30fd7b296b8fec584f436ccdf384267a001afbc3f5  khinsider-v2.0.7.tar.gz
"
